#include "calendar.h"
int start=0;
int day=1;
int daysmonth=31;
float daysweek=0;
float leap =0;
float month=1;
int main(){
	cout <<"What day is Jan 1st?\n";
	cout<<"-------------------------------------------\n";
	cout<<"|0-Sun 1-Mon 2-Tue 3-Wed 4-Thu 5-Fri 6-Sat|\n";
	cout<<"-------------------------------------------\n";
	cout<<"Enter the day   ";
	cin>>start;
	while (start>6||start<0){
		cout<<"ERROR INCORRECT NUMBER\n";
		cin>>start;
	}
	cout<<"\nIs This Year a Leap Year? YES is 1 or NO is 2\n";
	cin>>leap;
	while (leap!=1&&leap!=2){
		cout<<"ERROR INCORRECT NUMBER\n";
		cin>>leap;
	}
	if (leap==1){
cout<<"yes\n";
	}
	else{
		cout<<"no\n";
	}
	cout<<"--------------------------------------------------\n";
	cout<<"Sun Mon Tue Wed Thu Fri Sat\n";
	
	for(int x = 0; x<start; x++){
		cout<<"    ";
	}
	daysweek=start;
	while(day<daysmonth){
		while(daysweek<7&&(day<daysmonth)){
				
			if (day>9){
				cout<<" "<<day<<" ";
			}
			else{
				cout<<"  "<<day<<" ";
			}
			day++;
			daysweek++;
	}
		cout<<"\n";
	daysweek=0;
	
	}

	while(true){
	}
	return(0);
}
calendar::calendar(void)
{
}


calendar::~calendar(void)
{
}
